﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class DatePicker_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        GetDateTime();
        DatePicker();
    }


    private void GetDateTime()
    {
        DateTime dt = new DateTime();
        dt = DateTime.Now;
        Label1.Text = dt.ToShortDateString();
        Label1.Text = (dt.GetDateTimeFormats())[0];
        Label1.Text = dt.ToBinary().ToString();
        Label1.Text = dt.ToLocalTime().ToShortDateString();
    }
    private void DatePicker()
    {
        string BeginDate = "2010-11-12";
        BeginDate = "11/12/2010";
        string str = "$('#txtBeginDate').datepick({ dateFormat: 'mm/dd/yy', minDate:'" + BeginDate + "' });";
        ScriptManager.RegisterClientScriptBlock(this, GetType(), "aa", str, true);

    }
    protected void btnChange_Click(object sender, EventArgs e)
    {
        DatePicker();
    }
}
